ContactW
ContactWord


PURPOSE
ContactW provides easy addressing of Word documents, using address
information from the Contacts database.

SETUP
ContactW runs under Macro5,  Pascal Nicolas.
Install SYSTINFO.SIS and CNTOPX.SIS; copy ContactW.opo to the Macros folder;
create a folder for storage of field code databases and copy the "All fields"
and "Fax fields" databases to this folder.
At first startup you will be prompted to select one of these fields databases.
A directory C:\System\Apps\ContactW\ will be created, including files
ContactW.dat and ContactW.ini. This concludes the initialisation.

USAGE
Usage is evident:
 Create a Word template using field codes as set in the "All fields"
database (templates "ContactW.tpl" and "Fax.tpl" supplied), or adapt the
codes in the database to suit existing templates;
 Create a new document based on this template and customise it;
 Run ContactW;
 If you wish to switch or modify the fields database press Fields (Ctrl+F);
 Enter any text referring to first name, last name or company name of the
recipient and hit OK, or alternatively enter a text string and choose Ctrl+A
for search in all fields (in this option use * to separate text that may
appear in different fields);
 Matching contacts will be shown; pick the one you are looking for or refine
the search (use Ctrl+V to paste the search string, e.g. as search input for
ContactX).
If you choose Clip from this dialog (Ctrl+C), field labels and contact data
will be written to the clipboard; use Ctrl+V to paste in any application.
Hitting OK will paste contact data in the Word document if it was empty; if
not, you will eventually be returned to the document, where the field codes
are replaced with the corresponding address data of the recipient. Here
Ctrl+V pastes the recipients first + last name or company name.
The document is saved before addressing; revert to saved if you don't like
the result (Ctrl+R).
The code replacement works by sending keys to Word, using Macro5 commands. In
order to allow Word to keep up with this process it is slowed down. The time
required for addressing can be significantly reduced by deleting unused codes
from the fields database. You can create separate field databases for
different tasks (such as "Fax fields") and customise the pasting behaviour
for each task using settings, as described below. Field names may be changed
freely. Do not modify the ID numbers, which identify the fields to be called
from the Contacts database. The ID sequence is Contacts default; nr 33
(birthday) is left out since the Contact.opx does not support the date format.

SETTINGS
To be optionally specified in the record with ID=0 in the fields database,
e.g.	f=2,y=1,n=25
Flags
f=0	no field labels pasted
f=1	field labels from contacts database
f=2	field names from codes database
y=0	year in four digits
y=1	year in two digits
s=0	time without seconds
s=1	time with seconds
Numeric
n=###	maximum paste length of name data strings (field ID's 1 thru 5)
l=###	maximum paste length of other data strings (field ID's 6 and higher)
	 valid string lengths are 0 thru 250, default is 50
r=#	number of tabs before field labels
t=#	number of tabs between field labels and data
	 valid nrs of tabs are 0 thru 4, default is 1
Text
i=?	index; this single-digit string is internally appended to all field codes
specified in the fields dbase (space is ignored)
Syntax
 default values for flags and text are zero c.q. null
 if a flag or text is expected, only the single digit directly behind the =
is read
 if a numeric is expected, only the first 3 figures directly behind the =
are read
 for flags, any reading other than zero, space, or 1 is interpreted as 2

HISTORY
Version	Bytes	Date	Modifications
1.75	11420	12 feb 2000		does not trip on large field contents
1.70	10873	20 jan 2000		'About' added
				added option to view fields databases
				tab setting added
				field labels setting modified
				faulty field setting deleted
1.65	10755	18 dec 1999		fully language independent
1.62	10656	03 dec 1999		pastes contact data in empty document
				clipboard function cultivated
				language immunity promoted
1.55	12401	18 nov 1999		upgraded for German 5mx
				Contacts not closed
1.50	12224	31 oct 1999		option added to write data to clipboard
1.40	11759	23 oct 1999		all text search added
1.30	11112	21 oct 1999		contact id string left in clipboard
				confirmation dialog eliminated
				document retrieve advanced
				long names allowed
				proper comma handling in contact selector
				tabs treated as spaces in name search
1.20	10760	11 oct 1999		code synchronised with ContactX 2.40
				contact selector changed
				setting added for maximum name length
				search routine enhanced
1.10	10572	07 oct 1999		Contacts.cdb on D disk enabled
				code replacement always in background
1.00	10424	06 oct 1999		first release

COPYRIGHT
All rights reserved by the author.

DISCLAIMER
The author waives responsibility for any adverse consequence of using this
program;
running it is allowed under the condition that the user accepts the full risk
of use.

CREDITS
To Pascal Nicolas for Macro5 and support on clipboard functions, to Huub
Linthorst for date and time routines, to Richard Smedley for SafeOPL and to
Joachim Maier for support with the German 5mx.

KNOWN ISSUES
ContactW was written on the UK 5mx, and tested on the UK and German 5mx.
All known issues originate from the Contact.opx library, version 1.00. It is
yet unknown when EPOC will have the opx debugged.
 The contents of the "Job title" field are ignored in searches.
 Fields in contacts that were imported from other vCard applications may not
be recognised. These will be pasted as " failed ", where the  has
character code 150. Known failures involve address fields, following
synchronisation with MS Outlook and MS Schedule.

FEEDBACK
Please mail your findings to:		Frans Franken
				ContactW@franken.demon.nl
Latest version and more at:		http://www.franken.demon.nl
